<template>
	<view class="login-container">
		<view class="login-form">
			<text class="title">news登录</text>
			<view class="input-item">
				<input type="text" placeholder="请输入用户名" class="input"/>
			</view>
			
			<view class="input-item">
				<input type="password" placeholder="请输入密码" class="input"/>
			</view>
			
			<view class="login-btn">
				<button @click="handleLogin">登录</button>
			</view>
			
			<view  class="register-link">
				<text>没有账号？</text>
				<navigator url="/pages/newsTabBar/newsRegister/newsRegister" class="link">
				<view class="link">注册</view>
				</navigator>
			</view>
			
		</view>
	</view>
	
</template>


<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			handleLogin(){
				uni.switchTab({
					url: '/pages/newsTabBar/myPage/myPage'
				});
			},
			goRegister(){
				uni.reLaunch({
					url:'/pages/newsTabBar/newsRegister/newsRegister'
				})
			}
			
			
		}
	}
</script>

<style>

	
	.login-container {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		min-height: 100vh;
		background-color:#f5f5f5;
	}
	.login-form{
		display: flex;
		flex-direction: column;
		width: 80%;
		max-width: 400px;
		padding: 20px;
		background-color:#fff;
		border-radius: 8px;
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	}
	.title{
		font-size: 20px;
		font-weight: bold;
		text-align: center;
		margin-bottom: 20px;
	}
	.input-item{
		margin-bottom: 15px;
	}
	.input{
		width: 100%;
		height: 40px;
		padding-left: 5px;
		border: 1px solid #ddd;
		border-radius: 4px;
		box-sizing: border-box;
	}
	.login-btn{
		border-radius: 4px;
		padding: 1px;
		margin-bottom: 15px;
	}
	.register-link{
		display: flex;
		justify-content: center;
		font-size: 14px;
	}
	.link{
		color: #007aff;
		margin-left: 5px;
		
	}
</style>
